import '@ant-design/v5-patch-for-react-19';
import { AntdRegistry } from '@ant-design/nextjs-registry';
import '../styles/globals.scss';
import { SYSTEM_CONFIG } from '../lib/config';
import ErrorBoundary from '../components/ErrorBoundary';
import { AuthProvider } from '../contexts/AuthContext';

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="zh-CN">
      <head>
        <title>{SYSTEM_CONFIG.title}</title>
        <meta name="description" content="AIGC教学设计平台 - 智能生成 · 创新教学 · 未来教育" />
      </head>
      <body suppressHydrationWarning={true}>
        <AntdRegistry>
          <AuthProvider>
            <ErrorBoundary>
              {children}
            </ErrorBoundary>
          </AuthProvider>
        </AntdRegistry>
      </body>
    </html>
  )
}
